Skip to content

Conversation

@v-i-s-h-n-u-ps
Copy link
Contributor

No description provided.

@esezen esezen requested a review from Copilot September 25, 2025 13:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new API method getQuizAllQuestions to retrieve all questions for a specific quiz from the Constructor.io API.

  • Implements getQuizAllQuestions method with parameter validation and error handling
  • Adds comprehensive test coverage for the new API endpoint
  • Follows existing patterns for quiz API methods including timeout handling and response validation

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/modules/quizzes.js Adds the new getQuizAllQuestions method implementation
spec/src/modules/quizzes.js Adds comprehensive test suite for the new method covering various scenarios

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

@esezen esezen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v-i-s-h-n-u-ps this is looking good. Do you mind updating types as well? Also quick side q, does this question only take versionId and not sessionId?

* @function getQuizAllQuestions
* @description Retrieve all questions for a particular quiz from Constructor.io API
* @param {string} quizId - The identifier of the quiz
* @param {string} parameters - Additional parameters
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param {string} parameters - Additional parameters
* @param {object} parameters - Additional parameters

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added types and updated the change 22d68b0

@v-i-s-h-n-u-ps
Copy link
Contributor Author

does this question only take versionId and not sessionId?

The API takes, sessionId as well as an optional param.

@esezen
Copy link
Contributor

esezen commented Sep 29, 2025

The API takes, sessionId as well as an optional param.

Shouldn't we include it in the function (JSDocs) then? Am I missing something?
@v-i-s-h-n-u-ps

@v-i-s-h-n-u-ps
Copy link
Contributor Author

Shouldn't we include it in the function (JSDocs) then? Am I missing something?

Nope, it was I who missed it. Thank you.

Copy link
Contributor

@esezen esezen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@esezen esezen merged commit a577917 into Constructor-io:master Sep 30, 2025
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants